package edu.ubb.scp.model;

import java.lang.reflect.Field;

public class Game implements Model {
	private int GameID;
	private String GameName;
	private int GameTypeID;
	private int GameBrandID;

	public Game(String gameName, int gameTypeID, int gameBrandID) {
		super();
		GameName = gameName;
		GameTypeID = gameTypeID;
		GameBrandID = gameBrandID;
	}

	public Game() {

	}

	public int getGameID() {
		return GameID;
	}

	public void setGameID(int gameID) {
		GameID = gameID;
	}

	public String getGameName() {
		return GameName;
	}

	public void setGameName(String gameName) {
		GameName = gameName;
	}

	public int getGameTypeID() {
		return GameTypeID;
	}

	public void setGameTypeID(int gameTypeID) {
		GameTypeID = gameTypeID;
	}

	public int getGameBrandID() {
		return GameBrandID;
	}

	public void setGameBrandID(int gameBrandID) {
		GameBrandID = gameBrandID;
	}

	@Override
	public String toString() {
		return "Game [GameID=" + GameID + ", GameName=" + GameName
				+ ", GameTypeID=" + GameTypeID + ", GameBrandID=" + GameBrandID
				+ "]";
	}
	
	@Override
	public Field getPrimaryKey() {
		try {
			return Game.class.getDeclaredField("GameID");
		} catch (NoSuchFieldException e) {
			e.printStackTrace();
		} catch (SecurityException e) {
			e.printStackTrace();
		}
		return null;
	}
	
	@Override
	public Field[] getKeys() {
		return new Field[] { getPrimaryKey() };
	}
}
